<!DOCTYPE html>
<!-- saved from url=(0059)https://www.17sucai.com/preview/1/2017-03-19/Yzm/index.html -->
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

		<title>图形验证码</title>
	</head>
	<body>

		<div id="v_container" style="width: 200px;height: 50px;"><canvas id="verifyCanvas" width="200" height="50" style="cursor: pointer;">您的浏览器版本不支持canvas</canvas></div>
		<input type="text" id="code_input" value=""><button id="my_button">验证</button>

		<script src="./js/图片验证码/gVerify.js"></script>
		<script>
			var verifyCode = new GVerify("v_container");

			document.getElementById("my_button").onclick = function() {
				var res = verifyCode.validate(document.getElementById("code_input").value);
				if (res) {
					alert("验证正确");
				} else {
					alert("验证码错误");
				}
			}
		</script>



	</body>
</html>
